<template>
  <!-- <div class="todulist-container"> -->
    <el-scrollbar>
    <template v-for="(todu, index) in TodoList" :key="todu.id">
      <Todo :contentData="todu"></Todo>
    </template>
    </el-scrollbar>
  <!-- </div> -->
</template>
<script setup>
import Todo from "./Todo.vue"
import { useStore } from "vuex";
import { computed } from "vue";
import dayjs from "dayjs";

const store = useStore();

const currentDay = computed(() => dayjs(store.state.day.currentDay));

const TodoList = computed(() => store.state.todo.TodoList.filter(item => dayjs(item.date).isSame(currentDay.value, 'D')));
</script>

<style lang="scss" scoped>
.todulist-container {
  overflow: auto;
  box-sizing: border-box;
  height: 100%;
}
</style>